package com.src;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import com.src.R;

public class MainActivity extends Activity{

	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState); 
        setContentView(R.layout.main); 
        
        Button btn1 = (Button)findViewById(R.id.btn1);
        btn1.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, OtherActivity.class);
				startActivity(intent);
				overridePendingTransition(R.anim.fade, R.anim.hold);//淡入淡出效果
			}        	
        });
        
        Button btn2 = (Button)findViewById(R.id.btn2);
        btn2.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, OtherActivity.class);
				startActivity(intent);
				overridePendingTransition(R.anim.my_scale_action,
						R.anim.my_alpha_action);//放大淡出效果
			}        	
        });
        
        Button btn3 = (Button)findViewById(R.id.btn3);
        btn3.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, OtherActivity.class);
				startActivity(intent);
				overridePendingTransition(R.anim.scale_rotate,
						R.anim.my_alpha_action);//转动淡出效果1
			}        	
        });
        
        Button btn4 = (Button)findViewById(R.id.btn4);
        btn4.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, OtherActivity.class);
				startActivity(intent);
				overridePendingTransition(R.anim.scale_translate_rotate,
						R.anim.my_alpha_action);//转动淡出效果2
			}        	
        });
        
        Button btn5 = (Button)findViewById(R.id.btn5);
        btn5.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, OtherActivity.class);
				startActivity(intent);
				overridePendingTransition(R.anim.scale_translate,
						R.anim.my_alpha_action);//左上角展开淡出效果
			}        	
        });
        
        Button btn6 = (Button)findViewById(R.id.btn6);
        btn6.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, OtherActivity.class);
				startActivity(intent);
				overridePendingTransition(R.anim.hyperspace_in,
						R.anim.hyperspace_out);//压缩变小淡出效果
			}        	
        });
        
        Button btn7 = (Button)findViewById(R.id.btn7);
        btn7.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, OtherActivity.class);
				startActivity(intent);
				overridePendingTransition(R.anim.push_left_in,
						R.anim.push_left_out);//右往左推出效果
			}        	
        });
        
        Button btn8 = (Button)findViewById(R.id.btn8);
        btn8.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, OtherActivity.class);
				startActivity(intent);
				overridePendingTransition(R.anim.push_right_in,
						R.anim.push_right_out);//左往右推出效果
			}        	
        });
        
        Button btn9 = (Button)findViewById(R.id.btn9);
        btn9.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, OtherActivity.class);
				startActivity(intent);
				overridePendingTransition(R.anim.push_down_in,
						R.anim.push_down_out);//上往下推出
			}        	
        });
        
        Button btn10 = (Button)findViewById(R.id.btn10);
        btn10.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, OtherActivity.class);
				startActivity(intent);
				overridePendingTransition(R.anim.push_up_in,
						R.anim.push_up_out);//下往上推出
			}        	
        });
        
        Button btn11 = (Button)findViewById(R.id.btn11);
        btn11.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, OtherActivity.class);
				startActivity(intent);
				overridePendingTransition(R.anim.slide_left,
						R.anim.slide_right);//左右交错效果
			}        	
        });
        
        Button btn12 = (Button)findViewById(R.id.btn12);
        btn12.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, OtherActivity.class);
				startActivity(intent);
				overridePendingTransition(R.anim.wave_scale,
						R.anim.my_alpha_action);//放大淡出效果
			}        	
        });
        
        Button btn13 = (Button)findViewById(R.id.btn13);
        btn13.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, OtherActivity.class);
				startActivity(intent);
				overridePendingTransition(R.anim.zoom_enter,
						R.anim.zoom_exit);//缩小效果
			}        	
        });
        
        Button btn14 = (Button)findViewById(R.id.btn14);
        btn14.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, OtherActivity.class);
				startActivity(intent);
				overridePendingTransition(R.anim.slide_up_in,
						R.anim.slide_down_out);//上下交错效果
			}        	
        }); 
        
        Button btn15 = (Button)findViewById(R.id.btn15);
        btn15.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, TranslateLayout.class);
				startActivity(intent);//转轴旋转
			}        	
        }); 
        
        Button btn16 = (Button)findViewById(R.id.btn16);
        btn16.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(MainActivity.this, CharactersPopActivity.class);
				startActivity(intent);//文本内容飘逸
			}        	
        }); 
        
        Button btn17 = (Button)findViewById(R.id.btn17);
        btn17.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				android.os.Process.killProcess(android.os.Process.myPid());
				finish();//退出
  
			}        	
        }); 
    }
}